Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: data residency adaptations #2703

Merged
merged 1 commit into from
Nov 17, 2022
Merged

Conversation

atzoum
Copy link
Contributor

@atzoum atzoum commented Nov 15, 2022

Description

With data residency, multiple data planes can exist for the same namespace/workspace in different regions. Each data plane will operate against a region-specific configuration and warehouse nodes need to advertise their region to cp-router, so that control plane can perform cp-router requests targeting a specific region.

According to the above, the following rudder-server adaptations are required:

  • If a region is set in the environment's configuration, include it as a region query parameter when requesting the configuration from config backend.
  • If a region is set in the environment's configuration, include it as a region label in cp-router's authentication response.

Relevant work

#70 adds support for labels and label-based selection of connections in cp-router.

Notion Ticket

Link

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@codecov
Copy link

codecov bot commented Nov 15, 2022

Codecov Report

Base: 45.49% // Head: 45.48% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (82a017f) compared to base (ad2626f).
Patch coverage: 65.38% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2703      +/-   ##
==========================================
- Coverage   45.49%   45.48%   -0.02%     
==========================================
  Files         290      290              
  Lines       48028    48045      +17     
==========================================
+ Hits        21850    21851       +1     
- Misses      24797    24809      +12     
- Partials     1381     1385       +4     
Impacted Files Coverage Δ
controlplane/auth.go 0.00% <0.00%> (ø)
warehouse/api.go 70.18% <40.00%> (-0.24%) ⬇️
config/backend-config/single_workspace.go 77.19% <46.15%> (-3.72%) ⬇️
config/backend-config/namespace_config.go 70.00% <74.07%> (-3.96%) ⬇️
config/backend-config/backend-config.go 81.74% <100.00%> (+0.21%) ⬆️
processor/processor.go 85.99% <0.00%> (-0.42%) ⬇️
router/router.go 73.98% <0.00%> (+0.18%) ⬆️
router/manager/manager.go 100.00% <0.00%> (+3.29%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@atzoum atzoum force-pushed the chore.dataResidencyAdaptations branch from 2c4345c to 9e0fe8e Compare November 15, 2022 13:16
@atzoum atzoum changed the title [WIP] chore: data residency adaptations, introducing region [WIP] chore: data residency adaptations Nov 15, 2022
@atzoum atzoum changed the title [WIP] chore: data residency adaptations chore: data residency adaptations Nov 15, 2022
@atzoum atzoum force-pushed the chore.dataResidencyAdaptations branch from 9e0fe8e to 3774a80 Compare November 16, 2022 13:27
@atzoum atzoum requested a review from pChondros November 17, 2022 08:06
@atzoum atzoum force-pushed the chore.dataResidencyAdaptations branch from 3774a80 to 82a017f Compare November 17, 2022 08:23
@cisse21 cisse21 merged commit 52d9392 into master Nov 17, 2022
@cisse21 cisse21 deleted the chore.dataResidencyAdaptations branch November 17, 2022 09:43
@@ -303,11 +305,12 @@ func newForDeployment(deploymentType deployment.Type, configEnvHandler types.Con
// Setup backend config
func Setup(configEnvHandler types.ConfigEnvI) (err error) {
deploymentType, err := deployment.GetFromEnv()
region := config.GetString("region", "")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good, if this line is below err check line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants